

<extend name="Public:base" />
<!--header end-->
<block name="title">
	<title>购物车</title>
</block>


<block name="css">
	<link rel="stylesheet" href="__PUBLIC__css/shopping_cart.css" />
</block>

<block name="js">
	<script>var bgurl = "__ROOT__/Public/Home/";</script>
	<script type="text/javascript" src="__PUBLIC__js/shopping_cart-2.js"></script>
	<script type="text/javascript" src="__PUBLIC__js/nav_logo.js"></script>
</block>



<block name="body">
		<!--content-->
<div class="content">
			<div class="container">

				<!--menu组件-->
				{:W('Index/menu',array('logo_05.png'))}
				<form id="m_form"action="{:U('User/checkout')}" method="get" class="form-horizontal" role="form">

				<div class="responsive_cart">

					<div class="cart_text">

						<div class="row">


								<div class="col-sm-12">

									<h4>我的购物车</h4>

									<span>全部商品 </span>

								</div>

								<div class="text_list col-sm-12">

									<div class="col-sm-3">

										<label class="checkbox-inline">

											<input type="checkbox" />全选

										</label>

									</div>

									<div class="col-sm-2">

										<p>数量</p>

									</div>

									<div class="col-sm-2">

										<p>单价</p>

									</div>

									<div class="col-sm-2">

										<p>商品信息</p>

									</div>

									<div class="col-sm-3">

										<p>总价</p>

									</div>



								</div>
								<php> //var_dump($order)</php>
								<ul>
									<volist name="order" id="vo">
									<li>
										<!--求出库存，以便设置复选框状态-->
										<php>$goods_attr = json_decode($vo['goods_attr'],true); $store = $goods_attr[$vo['attr']];</php>
										<div class="text_product col-sm-12">
											<div class="col-sm-3">
												<div style="float: left;">
													<input style="margin:90px 10px 0 0;cursor: pointer" class="cb_son" type="checkbox" value="{$vo.id}"
														<eq name="store" value="0">disabled<else/>checked</eq>  name="id[{$vo.id}]"
													/>
												</div>
												<div class="image" >
													<a href="{:U('Goods/info',array('id'=>$vo['goods_id']))}"><img class="img-responsive" class="img-responsive" src="{$vo.img}" height="50px" /></a>
												</div>
											</div>
											<div store="{$store}" class="col-sm-2">


												<button type="button" class="sub pull-left">-</button>

												<input type="text" readonly="readonly" class="num pull-left"

													<if condition="$store lt $vo.num ">
														<php>$vo['num'] = $store; $mark_lt[$i]=true;</php>
													</if>
													value="{$vo['num']}"
													name="number[{$vo.id}]"
												/>

												<button type="button" class="add pull-left"  >+</button>
												<eq name="mark_lt[$i]" value="true">
													<p class="store_tips" style="color: #f00;"><br>(库存不足,只剩 <strong>{$store}</strong> 件)</p>
												</eq>
											</div>

											<div class="col-sm-2">

												<p>

													<span>¥</span>&nbsp;

													<i class="singleprice">{$vo.goods_shop_price}</i>

												</p>

											</div>

											<div class="col-sm-2">
												<p style="padding-top:7px;">尺码：{$vo.attr}，颜色：{$vo.color}</p>

											</div>

											<div class="text_price col-sm-3">

												<p>

													<span>¥</span>&nbsp;

													<i class="totalprice"><php>echo keepTwo($vo['goods_shop_price']*$vo['num'])</php></i>

												</p>

												<a href="{:U('delect_cart_goods',array('id'=>$vo['id']))}" onc class="cart_del"  id="delete"  onclick="return confirm('是否移除商品:{$vo.title}')">删除</a>

											</div>

										</div>

									</li>

									</volist>

								</ul>


						</div>

					</div>

					<div class="xs_cart">
						<div class="row">

								<div class="col-xs-12">

									<h4>我的购物车</h4>

								</div>

								<div class="text_list col-xs-12">

									<div class="col-xs-4">

										<span>全部商品 </span>

									</div>

									<div class="col-xs-3">

										<p>单价</p>

									</div>

									<div class="col-xs-2">

										<p>折扣</p>

									</div>

									<div class="col-xs-3">

										<p>操作</p>

									</div>

								</div>

								<ul>

									<li>

										<div class="text_product col-xs-12">

											<div class="col-xs-4">

												<div class="image">

													<a href="product_center.html"><img class="img-responsive" class="img-responsive" src="__PUBLIC__img/shopping_pic01.png" alt="shopping_pic01" /></a>

												</div>

											</div>

											<div class="col-xs-3">

												<p>

													<span>¥</span><i>213.00</i>

												</p>

											</div>

											<div class="col-xs-2">

												<p>8.5</p>

											</div>

											<div class="col-xs-3">

												<button type="button" id="delete">删除</button>

											</div>

										</div>

									</li>

									<li>

										<div class="text_product col-xs-12">

											<div class="col-xs-4">

												<div class="image">

													<a href="product_center.html"><img class="img-responsive" class="img-responsive" src="__PUBLIC__img/shopping_pic02.png" alt="shopping_pic02" /></a>

												</div>

											</div>

											<div class="col-xs-3">

												<p>

													<span>¥</span><i>213.00</i>

												</p>

											</div>

											<div class="col-xs-2">

												<p>8.5</p>

											</div>

											<div class="col-xs-3">

												<button type="button" id="delete">删除</button>

											</div>

										</div>

									</li>

								</ul>


						</div>

					</div>

				</div>

<!--				pc端 -->
				<div class="checkout">
					<label class="checkbox-inline">
						<input type="checkbox" />全选
					</label>
					<input class="pull-right pc_submit" type="submit" value="结算" >
					<span class="pull-right">¥<i class="AllPrice">149.00</i></span>
					<p class="pull-right">商品总金额（不含运费）：</p>
				</div>

				<div class="xs_checkout">

					<label class="checkbox-inline">

						<input type="checkbox" />全选

					</label>

					<div class="pull-right">

						<p>商品总金额（不含运费）</p>

						<span>¥<i class="AllPrice">149.00</i></span>

						<button type="button" onclick="window.location.href='Confirm_order.html'">立即结账</button>

					</div>

				</div>
				</form>

			</div>

</div>
		<!--content end-->
</block>
